package com.poll.service.impl;

import com.poll.BasicTest;
import com.poll.entity.Clazz;
import com.poll.entity.ClazzType;
import com.poll.entity.User;
import com.poll.service.ClazzService;
import com.poll.service.UserService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

/**
 * Created by 峰哥 on 2018/1/3.
 */
public class UserServiceImpltest extends BasicTest{
    @Autowired
    UserService userService;

    @Test
    public void testlogin() {
        User u = userService.login("admin", "admin");
        //Assert.assertEquals("admin", u.getUsername());
        //Assert.assertEquals("123456", u.getPassword());
        System.out.println(u);
    }

    @Test
    public void testRegisterUser() {
        User user = new User();
        user.setUsername("admin");
        user.setPassword("admin");
        userService.register(user);
        
    }
}